Retrieve Action Properties
Source code
'************************************************************************************************************************
'Description:
'
'This example opens a test, retrieves and action by its index, and retrieves
'the description for a specified action.
'
'Assumptions:
'There is no unsaved test currently open in UFT One.
'For more information, see the example for the Test.SaveAs method.
'************************************************************************************************************************

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable

' Open UFT One
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Launch UFT One
qtApp.Visible = True ' Set UFT One to be visible

qtApp.Open "C:\Tests\Test1", False, False ' Open a test

' Get the first action in the test by index (start from 1)
MsgBox qtApp.Test.Actions(1).Name

' Get the description of a specified action
MsgBox qtApp.Test.Actions("Action1").Description

'Close UFT One
qtApp.Quit ' Quit UFT One

Set qtApp = Nothing ' Release the Application object